package shard

//import "sync"

//type Cluster struct {
//	routers map[string]Router // appName=router，appName具有唯一型

//	//

//	lock sync.Mutex
//}

////新Router
//func NewCluster() *Cluster {
//	return new(Cluster).Init()
//}

////初始化Router
//func (c *Cluster) Init() *Router {
//	c.routers = make(map[string]Router)
//	c.lock = sync.Mutex{}
//	return r
//}

//func (c *Cluster) AddRouter(name string, r Router) {
//	c.lock.Lock()
//	defer c.lock.Unlock()
//	c.routers[name] = Router
//}

//func (c *Cluster) AddShard(name string, s *Shard) {
//	c.lock.Lock()
//	defer c.lock.Unlock()
//	router := c.routers[name]
//	router.Add(s)
//}
//func (c *Cluster) AddShardResource(name string, res *ShardResource) {
//	c.lock.Lock()
//	defer c.lock.Unlock()
//	router := c.routers[name]

//	router.Add(s)
//}
